Public Class Factura

    Private Sub cmdTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdTest.Click
        Dim fact As WsFct.Factura = New WsFct.Factura
        Dim linfact As Generic.List(Of WsFct.LiniaFactura) = New Generic.List(Of WsFct.LiniaFactura)

        Dim linfact1 As WsFct.LiniaFactura = New WsFct.LiniaFactura
        linfact1.Discount = 1
        linfact1.Quantity = 100
        linfact1.UnitPrice = 2
        linfact1.ProductID = 1
        Dim linfact2 As WsFct.LiniaFactura = New WsFct.LiniaFactura
        linfact2.Discount = 1
        linfact2.Quantity = 110
        linfact2.UnitPrice = 3
        linfact2.ProductID = 2
        linfact.Add(linfact1)
        linfact.Add(linfact2)

        fact.dataInici = Now
        fact.descripcio = "TEST"
        fact.import = 125.0

        fact.LlistaFactura = linfact.ToArray
        Dim ws As WsFct.Service = New WsFct.Service

        Dim res As String = ws.AfegirFactura(fact)
        MsgBox(res, MsgBoxStyle.Information, "Resultat")
    End Sub
End Class